package cn.wolfcde.luowowo.website.web.controller;


import cn.wolfcode.luowowo.ticket.domain.Ticket;
import cn.wolfcode.luowowo.ticket.service.ITicketService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/ticket")
public class TicketController {
    @Reference
    private ITicketService ticketService;

    @RequestMapping("")
    public String ticket(Model model){

        //tickets
        List<Ticket> tickets = ticketService.selectTicketTop4();

        model.addAttribute("tickets",tickets);

        return "ticket/index";
    }
}
